🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / core / model / src / commonMain / kotlin / org / meshtastic / core / model / util / ByteStringExtensions.kt
Displaying Raw • Download
core/model/src/commonMain/kotlin/org/meshtastic/core/model/util/ByteStringExtensions.kt 20b64d4d99cb5e7d29df7c8c031f594e454d85e9 (20b64d4d) Text, 1.12 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.core.model.util
Tff7b72import T7ee787okio.ByteString
Tff7b72import T7ee787okio.ByteString.Companion.decodeBase64
Tff7b72fun Te6edf3ByteStringTb4b4b4.Td2a8ffencodeToStringTb4b4b4(Tb4b4b4)Tb4b4b4: Tffa657String Tff7b72= Te6edf3base64Tb4b4b4(Tb4b4b4)
T8b949e/**
* Decodes a Base64 string into a [ByteString].
*
* @throws IllegalArgumentException if the string is not valid Base64.
*/
Tff7b72fun Te6edf3StringTb4b4b4.Td2a8ffbase64ToByteStringTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3ByteString Tff7b72=
Te6edf3decodeBase64Tb4b4b4(Tb4b4b4) Tff7b72?: Tff7b72throw Te6edf3IllegalArgumentExceptionTb4b4b4(Ta5d6ff"Ta5d6ffInvalid Base64 string: Tffd700$Te6edf3thisTa5d6ff"Tb4b4b4)
Served by rngit 1.5.0 - Generated in 0.04s